POV-Ray : Newsgroups : povray.general : Actual Specular calculations? : Re: Actual Specular calculations? Server Time
4 Aug 2024 08:22:50 EDT (-0400)
  Re: Actual Specular calculations?  
From: Tim Nikias v2 0
Date: 11 Jun 2003 18:36:03
Message: <3ee7aed3$1@news.povray.org>
It is similiar to what MegaPOV did, yes. What I want is to
limit the area of effect to the places where the actual
specular highlights appear (and I know that this depends
on viewing angle and lighting angle, which is why I asked
for that). So far, my tests have succeeded in "emulating"
specular highlights on a two-triangle-per-pixel base by
casting rays (via trace()) at the center where the actual
pixels would be, thus getting information on depth and
surface normals. Based on that, I calculate the specular
highlight the same way as POV-Ray does it internally
(thanks to you two), although I've simplified some values
to 1 for testing purposes.
So for now, I can have a simple image without specular
highlights, and yet post-process them onto the very
image, during the creation of the image.
If I'd go into insane detail and emulate the entire
rendering process of POV-Ray, I could even implement
my own means of blurred reflections (with a nice
distribution of samples as said in some other thread),
but I don't want to do that (unless I've got too much time :-).

Its fairly interesting what could be possible, though so far
I haven't found much which can't be done with some
paint program (doh!) or even with POV itself... But I desperately
wanted that bleeding/blinding effect of sparkling and bright objects,
so I attacked the code and went on! :-)

-- 
Tim Nikias v2.0
Homepage: http://www.digitaltwilight.de/no_lights
Email: Tim### [at] gmxde

>
> > I've looked around in the docs, but can't find any
> > reference to the actual formulae used to derive
> > the specular effect when using the specular-finish
> > along with roughness, so perhaps someone might
> > jump in and explain it to me?
>
> This is documented in the function do_specular() in lighting.cpp.
>
>
> > What I'm trying to do (in order to clear up what exactly
> > I want to know):
> > Shoot a ray at an object, and from that point shoot
> > rays to the different light-sources to check for specular
> > highlights from them (just the way a raytracer does). Now
> > I know that at certain angles, the highlight is generated,
> > but I'd like to know the exact angles etc for my pixel-
> > post-processing script. I don't want to simulate the
> > raytracing process with that script, but to gather information
> > on where highlights are occuring, in order to bleed the
> > bright light across the objects boundaries, just like it
> > happens in the human eye (or probably any eye, for
> > that matter).
>
> Well, the highlight isn't a point, it practically covers every point on
> the object is not in shadow, and could have multiple relative maxima and
> non-point maxima. For example, the points of maximum intensity on a
> torus can be a ring. This approach is pretty much a dead-end.
>
> In any case, this happens because of the brightness, not because of
> anything special to highlights. What you want sounds somewhat similar to
> the old MegaPOV glow post-process filter, which operated by combining a
> slightly blurred version of the image with the unblurred version. High
> brightness areas bleed more, giving them a glowing look. If you are
> trying to implement this in POV script instead of a patch, you will need
> to use the HDR patch to avoid clipping the values.
>
> -- 
> Christopher James Huff <cja### [at] earthlinknet>
> http://home.earthlink.net/~cjameshuff/
> POV-Ray TAG: chr### [at] tagpovrayorg
> http://tag.povray.org/


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.